import request from '@/utils/request.js'

// 获取列表
export const getnoticeApi = (params) => {
  return request({
    url: '/content/notice',
    method: 'get',
    params
  })
}

// 获取详情
export const getnoticeInfoApi = (id) => {
  return request({
    url: '/content/notice/' + id,
    method: 'get',
  })
}

// 新增数据
export const addnoticeApi = (data) => {
  return request({
    url: '/content/notice',
    method: 'post',
    data
  })
}

// 修改数据
export const editnoticeApi = (data) => {
  return request({
    url: '/content/notice/' + data.id,
    method: 'put',
    data
  })
}

// 删除
export const delnoticeApi = (id) => {
  return request({
    url: '/content/notice/' + id,
    method: 'delete'
  })
}

//获取小区列表
export const getcommunityApi = (data) => {
  return request({
    url: '/community',
    method: 'get',
  })
}